import service from "@/utils/fetch";
const post = {
  //查询商品活动表分页
  skuActivity_list(params) {
    return service({
      method: "get",
      params,
      url: "/api/skuActivity/"
    });
  },

  //新增商品活动表
  skuActivity_add(params) {
    return service({
      method: "post",
      data: params,
      url: "/api/skuActivity/"
    });
  },

  //修改商品活动表
  skuActivity_update(params) {
    return service({
      method: "put",
      data: params,
      url: "/api/skuActivity/"
    });
  },

  //删除商品活动表
  skuActivity_delete(ids) {
    return service({
      method: "delete",
      data: ids,
      url: "/api/skuActivity/"
    });
  },

  //查询商品活动表详情
  skuActivity_detail(id) {
    return service({
      method: "get",
      url: `/api/skuActivity/${id}`
    });
  },

  //商品活动：终止
  skuActivity_stop(id) {
    return service({
      method: "post",
      data: {},
      url: `/api/skuActivity/stop/${id}`
    });
  }
};

export default post;
